<?php defined('_JEXEC') or die('Restricted access'); // no direct access ?>
<?php
JHTML::_('behavior.tooltip');
$linkAjax=JRoute::_( JURI::base().'index.php?option=com_properties&amp;controller=searchajax&amp;format=raw&amp;task=SearchAjax&amp;langg='.$lang->getTag());
?>
<script type="text/javascript">
function SearchAjax(idCy,idS,idL,idC,idT){
var progressS = $('progressS');
new Ajax("<?php echo $linkAjax;?>", 
{method: 'get',	
onRequest: function(){progressS.setStyle('visibility', 'visible');},
onComplete: function(){progressS.setStyle('visibility', 'hidden');},
update: $('logB'), 
data: '&amp;cyid='+idCy+'&amp;sid='+idS+'&amp;lid='+idL+'&amp;cid='+idC+'&amp;tid='+idT}).request();
			}
</script>
<div id="accordion">
<div id="buscador">

<div class="element">
<div class="innerelementBuscar">
<div class="formbuscar">

<form name="FormBuscar" id="FormBuscar" action="<?php echo JRoute::_( 'index.php?option=com_properties&amp;task=search') ?>" method="post">
<div id="logB" style="float:left;">
</div>
<div id="progressS"></div>
<div class="button_search">
<input value="<?php echo JText::_('Search'); ?> " class="form2_submit" type="submit">
</div>
<?php 
if(JRequest::getVar('cyid')){$cyid = JRequest::getVar('cyid');}else{$cyid = 0;}
if(JRequest::getVar('sid')){$sid = JRequest::getVar('sid');}else{$sid = 0;}
if(JRequest::getVar('lid')){$lid = JRequest::getVar('lid');}else{$lid = 0;}
if(JRequest::getVar('cid')){$cid = JRequest::getVar('cid');}else{$cid = 0;}
if(JRequest::getVar('tid')){$tid = JRequest::getVar('tid');}else{$tid = 0;}
/*
echo '<script type="text/javascript">
window.onload = SearchAjax('.$cyid.','.$sid.','.$lid.','.$cid.','.$tid.');
</script>';
*/
//echo $link_ciudad[52];?>

</form>


</div><!--formBuscar-->
</div><!--innerelementBuscar-->
</div><!-- element-->
<div class="toggler" onclick="javascript: SearchAjax(<?php echo $cyid.','.$sid.','.$lid.','.$cid.','.$tid;?>); "></div>
</div>  <!--acordion -->
</div><!--buscador -->   
<div style="clear:both"></div>